<?php

namespace App\Http\Controllers;

use App\Http\Service\Brand\CategorymappingService;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;

class CategorymappingController extends BaseController
{
    private $getRules=[
            'unique_id'=> 'required',
            'people_id'=> 'required',
        ];
    private  $getRulesMessage=[
            'unique_id.required'=> '唯一标识【unique_id】不能为空',
            'people_id.required'=> '用户id【people_id】不能为空',
        ];
    public $repository;
    public function __construct(CategorymappingService $repository)
    {
        parent::__construct();
        $this->repository = $repository;
    }
    //分类映射-列表
    public function getList(Request $request)
    {
        $data=[
            
        ];

        $this->success($this->repository->getList($request,$data));
    }
   
    //分类映射-推送接口
    public function addData(Request $request)
    {
        $data=[
            'original_name'=>$request->json("original_name"),
            'standard_name'=>$request->input("standard_name"),
        ];

        $this->repository->addData($request,$data);

    }

    //分类映射参数列表
    public function paramList(Request $request)
    {
         $data=[
            'level'=>$request->json("level"),
            'id'=>$request->json("id"),
            'name'=>$request->json("name"),
            'unique_name'=>$request->json("unique_name"),
            'keycontent'=>$request->input("keycontent"),
        ];

        $this->success($this->repository->paramList($request,$data));
    }

    

  

}
